package org.example;


import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jws;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.security.Keys;
import java.security.Key;
import java.util.Base64;

public class JwtVerificationExample {

    public static void main(String[] args) {
        // JWT Token
        String jwtToken = "eyJhbGciOiJSUzI1NiIsImNhdCI6ImNsX0I3ZDRQRDExMUFBQSIsImtpZCI6Imluc18yY3pHNFI0bkpNOU04aVRPbndRbUJLUDJGY24iLCJ0eXAiOiJKV1QifQ.eyJhenAiOiJodHRwOi8vbG9jYWxob3N0OjUxNzMiLCJleHAiOjE3MDkxMzI2NzIsImlhdCI6MTcwOTEzMjYxMiwiaXNzIjoiaHR0cHM6Ly9tb3ZlZC1rcmlsbC01MS5jbGVyay5hY2NvdW50cy5kZXYiLCJuYmYiOjE3MDkxMzI2MDIsInNpZCI6InNlc3NfMmN6U05iMWZxcGZPMDJnZzhDSmgwRXZUbmNqIiwic3ViIjoidXNlcl8yY3pTTmFwV3J6SEFtQklOdUFnQ1lRSzQxSlYifQ.Shj3VuXnCZVPu9bhoTlLCzT_CnrND6L9sQw074RNHHYPqhOMUntoZTF_Red78sNPKXnrlhSxpsaGGXUqGk2beoUhovDhnHySbLsBF2H5MxYsEvAKjVRsxj2EDnjr-9P6d6z-VVqBtYqWcW19lC-X0gIZtIiQDvzfPsiHmmZvpkabVxSPl36vuFGUM-B8l2arPuRdym6fBVoIbLZvihWneoEYfldvUt2VfpC0FsnuSRdcj6YdcUDL3RDtbNlxSKtW2AMmw4Sd8Vjyq-0wceYh7DrXAm3wdEFAi8jxowaK8vlN5ctwb_Wha84qZgRLK-QW7vmnqkC6RSQCl3-H9Xt2MA";

//        jwk
        String jwk = "{\n" +
                "    \"keys\": [\n" +
                "        {\n" +
                "            \"use\": \"sig\",\n" +
                "            \"kty\": \"RSA\",\n" +
                "            \"kid\": \"ins_2czG4R4nJM9M8iTOnwQmBKP2Fcn\",\n" +
                "            \"alg\": \"RS256\",\n" +
                "            \"n\": \"2BumZ7ULDD9cb5qDLpzNmO8nj0lkyUJ22-gTfxWJrUVzw3yB6UzvNjRodxFWM4q0wPG3uYoPpqE5bJnkelaYR6U1MV70BVmu-saoVXOBxvatDIHuOByQR5IXWOvzXyZrjBYJ_uqX2ATEsrkGNg_tbw866Qqf-AytSf4HbR0V9TAZqLQserd-tYUyWuMOsU1j9svgnrlctpuaShrl-631z0C2jtuAtbiP0uv2WQLpvWF7LFpSBbh12m95AWQl4-gHsm-QqbmNAe9vp7gKgthzAL8Eqvsg8N4BCgqNEY5voknY85ozOqSX86pBc3Vi_UeTIBub7m-2a3JUpP1CeHOLUQ\",\n" +
                "            \"e\": \"AQAB\"\n" +
                "        }\n" +
                "    ]\n" +
                "}";

    }
}
